public class Square extends ASingleShape {
	private int size;

	public Square(CartesianPoint location, int size) {
		super(location);
		this.size = size;
	}

	@Override
	public double area() {
	
		return this.size*this.size;
	}

	@Override
	public boolean contains(CartesianPoint that) {
		int thisX= this.location.getX();
		int thisY= this.location.getY();
		return (that.getX()>=thisX&& that.getX()<=thisX+this.size)&&
				(that.getY()>=thisY&& that.getY()<=thisY+this.size);
		

	}

	@Override
	public Rectangle boundingBox() {
		return new Rectangle(this.location, this.size, this.size);
	}

	@Override
	public double distancoTo0() {
		// TODO Auto-generated method stub
		return 0;
	}
	

}
